package org.hang.query;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 基础查询对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseQuery {
    private String sortField; //排序字段
    private String sortType;  //排序类型 desc降序 asc升序号
    //关键字
    private String keyword;
    //有公共属性-分页
    private Integer page = 1; //当前页
    private Integer rows = 10; //每页显示多少条

    public int getStart(){
        return (this.page-1)*rows;
    }

}
